home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / comm / cnet / cnet_toolkit.lha / routines / PRIV < prev    next >
Text File  |  1997-04-05  |  676b  |  15 lines

  1. PRIV: procedure expose priv handle status
  2.   arg mode,block,priv,id;c=left(mode,1)
  3.   if datatype(id,"n")=0 then do;findaccount id;id=result;end
  4.   if id=0 then do;transmit "Invalid Handle! Aborted!";return;end
  5.   loadscratch id;getscratch 1;handle=result
  6.   if handle="!" then do;transmit "Empty Account! Aborted!"
  7.     savescratch (-id);return;end
  8.   getscratch 1401332+block*48;a=reverse(d2c(result,4))
  9.   if c="E" then a=BitSET(a,priv);if c="D" then a=BitCLR(a,priv)
  10.   if c="T" then a=BitCHG(a,priv);priv=word("No Yes",BitTST(a,priv)+1)
  11.   if c="V" then do;savescratch (-id);return;end
  12.   setobject c2d(reverse(a));putscratch 1401332+block*48
  13.   savescratch id;status=result
  14.  return
  15.